﻿@model IEnumerable<N2.Definitions.Runtime.ContentRegistration>
@{
    ViewBag.Title = "Index";
}

@foreach (var re in Model)
{

<h2>@re.Title</h2>

<ul>
	<li>@re.ContentType</li>
@foreach (var c in re.Containables.OfType<N2.Definitions.IEditableContainer>().OrderBy(c => c.SortOrder))
{
	<li>
		@c.Name (@c.SortOrder)
		<ul>
		@foreach (var e in re.Containables.OfType<N2.Definitions.IEditable>().Where(e => e.ContainerName == c.Name).OrderBy(e => e.SortOrder))
		{
			<li>@e.Name (@e.SortOrder)</li>
		}
		</ul>
	</li>
}
@foreach (var e in re.Containables.OfType<N2.Definitions.IEditable>().Where(e => e.ContainerName == null).OrderBy(e => e.SortOrder))
{
	<li>@e.Name (@e.SortOrder)</li>
}
@foreach (var tp in re.TouchedPaths)
{
	<li>@tp</li>
}
</ul>
}